<div id="mws-container" class="clearfix">
  <div class="container">
    <div class="mws-panel grid_8">
      <div class="mws-panel-header"> <span class="mws-i-24 i-table-1" style="width:100%;">Category - Management
      
		  </span> <span class="linktop"><?php echo $html->link('Add Category', array('action'=>'admin_addcategory'), array('class'=>'top_link_pannel'));?>
      
      
      </span> </div>
      <div class="mws-panel-body">
        <div class="dataTables_wrapper">
          <table class="mws-datatable-fn mws-table">
            <thead>
              <tr>
                <th class="sorting_asc" rowspan="1" colspan="1" style="width: 141px;">Category Name</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 254px;">Category Image</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 254px;">Category Parent</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 239px;">Category Slug</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 150px;">Category Status</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 91px;">Options</th>
              </tr>
            </thead>
            <?php if(isset($Category) and ($Category)): ?>
            <tbody>
            <?php  foreach($Category as $Cat){
				
				//pr($Cat);
				//exit;
				?>
              <tr class="gradeA odd">
                <td class=" sorting_1"><?php echo $html->link($Cat['Category']['name'], array('action'=>'admin_categories',$Cat['Category']['slug']));  ?></td>
                <td><?php 
				if(isset($Cat['Category']['img']) and ($Cat['Category']['img']))
					{
						echo $html->image('Category/'.$Cat['Category']['img'], array('width'=>'50', 'height'=>'50'));
					}
				
				 ?></td>
                <td><?php echo $Cat['Category']['ParentType']; ?></td>
                <td><?php echo $Cat['Category']['slug']; ?></td>
                <td class="center"><?php if(isset($Cat['Category']['status']) and ($Cat['Category']['status']==1)){echo "Active";}else{ echo "Deactive";} ?></td>
                <td class="center">
			<?php 
                echo $html->link("Edit", 
                array('action'=>'admin_addcategory',"Category", 
                base64_encode($Cat['Category']['id'])), array('escape'=>false));  
            ?>
                <?php
					 echo $html->link('Delete',
					 array('controller'=>'Setups', 'action' => 'admin_delete_by_id',
					'Category',$Cat['Category']['id'],'categories'), array('escape' => false,'id'=>'alink'), 'Are you sure?');
			  ?>
                </td>
              </tr>
              <?php } ?>
            </tbody>
            <?php endif; ?>
          </table>
          <div class="dataTables_info"></div>
          <div class="dataTables_paginate paging_full_numbers">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
